package mate.events
{
	import classespinkpony.Address;
	import classespinkpony.District;
	import classespinkpony.Practice;
	import classespinkpony.User;
	
	import flash.events.Event;
	
	import mx.collections.ArrayCollection;
	
	public class RegistrationEvent extends Event
	{
		public static const INITREGISTRATION:String = "initRegistration";
		
		public static const COUNTRYSELECTED:String = "countrySelected";
		public static const GOTOREGISTRATIONPERSONALINFORMATION:String = "goToRegistrationPersonalInformation";
		public static const GOTOREGISTRATIONPROFESSION:String = "goToRegistrationProfession";
		public static const GOTOREGISTRATIONPRACTICE:String = "goToRegistrationPractice";
		public static const GOTOREGISTRATIONINVOICEADDRESS:String = "goToRegistrationInvoiceAddress";
		public static const GOTOREGISTRATIONFINAL:String = "goToRegistrationFinal";
		public static const DISTRICTSELECTED:String = "districtSelected";
		public static const CHECKUSERALREADYEXISTS:String = "checkUserAlreadyExists";
		
		public static const COMPLETEREGISTRATION:String = "completeRegistration";
		public static const SAVEINVOICEADDRESSTODB:String = "saveToDB";
		public static const SAVEUSERTODB:String = "saveUserToDB";
		public static const SAVEPRACTICEADDRESSTODB:String = "savePracticeAddressToDB";
		public static const SAVEPRACTICETODB:String = "savePracticeToDB";
		
		private var _searchNumber:Number;
		private var _searchString:String;
		private var _user:User;
		private var _address:Address;
		private var _practice:Practice;
		private var _district:District;
		private var _practices : ArrayCollection;

		[Bindable]
		public function get practices():ArrayCollection
		{
			return _practices;
		}

		public function set practices(value:ArrayCollection):void
		{
			_practices = value;
		}

		
		[Bindable]
		public function get practice():Practice
		{
			return _practice;
		}
		
		public function set practice(value:Practice):void
		{
			_practice = value;
		}
		
		[Bindable]
		public function get address():Address
		{
			return _address;
		}
		
		public function set address(value:Address):void
		{
			_address = value;
		}
		
		[Bindable]
		public function set searchNumber(value:Number):void{
			this._searchNumber = value;
		}
		public function get searchNumber():Number{
			return this._searchNumber;
		}
		
		[Bindable]
		public function set searchString(searchString:String):void{
			this._searchString = searchString;
		}
		public function get searchString():String{
			return this._searchString;
		}
		
		[Bindable]
		public function get user():User
		{
			return _user;
		}
		
		public function set user(value:User):void
		{
			_user = value;
		}

		[Bindable]
		public function get district():District
		{
			return _district;
		}

		public function set district(value:District):void
		{
			_district = value;
		}
		
		
		public function RegistrationEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
	}
}